# -*- coding: utf-8 -*-

###############################################################################
#    KShootout - online shootout card game.                                   #
#    Copyright (C) 2008, 2009  MacJariel                                      #
#                                                                             #
#    KShootout is free software: you can redistribute it and/or modify        #
#    it under the terms of the GNU General Public License as published by     #
#    the Free Software Foundation, either version 3 of the License, or        #
#    (at your option) any later version.                                      #
#                                                                             #
#    KShootout is distributed in the hope that it will be useful,             #
#    but WITHOUT ANY WARRANTY; without even the implied warranty of           #
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            #
#    GNU General Public License for more details.                             #
#                                                                             #
#    You should have received a copy of the GNU General Public License        #
#    along with KShootout.  If not, see <http://www.gnu.org/licenses/>.       #
###############################################################################

from kshootoutcommon import *

GameEventCmds = []

gec = GameEventCmd("MoveCard", "move-card")
gec["doxyString"] = (
                     "The MoveCardCmdData struct describes a <i>card movement<i> "
                     "command. <i>Card movement</i> commands are used to describe the "
                     "movement of a card from one pocket to another.\n\n"
                     "The source pocket is described by #pocketTypeFrom and #playerFrom "
                     "and the target pocket is described by #pocketTypeTo and #playerTo.\n"
                     "The #card member describes the moved card. If the moved card is not "
                     "revealed for the event receiver, a default-constructed CardData is "
                     "used.\n"
                     "The #secondCard member is used for special cases. At the moment, it "
                     "is only used when a card from the top of the graveyard is moved. "
                     "#secondCard then describes the card under the moved card."
                    )
gec["simpleMembers"].append(Member("PocketType", "pocketTypeFrom", "pocket-type-from", "The source pocket type.", "POCKET_INVALID"))
gec["simpleMembers"].append(Member("PocketType", "pocketTypeTo", "pocket-type-to", "The target pocket type.", "POCKET_INVALID"))
gec["simpleMembers"].append(Member("PlayerId", "playerFrom", "player-from", "The source player id.", "0"))
gec["simpleMembers"].append(Member("PlayerId", "playerTo", "player-to", "The target player id.", "0"))
gec["complexMembers"].append(Member("CardData", "card", "card", "The moved card."))
gec["complexMembers"].append(Member("CardData", "secondCard", "second-card", "This card is used in special cases."))
GameEventCmds.append(gec)

gec = GameEventCmd("UpdatePlayer", "update-player")
gec["doxyString"] = (
                     "The UpdatePlayerCmdData struct describes a <i>update-player<i> command. "
                     "<i>Update plater</i> commands are used to change some attributes of a "
                     "player. The #playerId member contains the id of the player to be updated "
                     "and using setFlag() and hasFlag() methods you can set or determine which "
                     "attributes are meant to be updated."
                    )
gec["flaggedMembers"] = True
gec["simpleMembers"].append(Member("PlayerId", "playerId", "player-id", "", "0"))
gec["simpleMembers"].append(Member("bool", "isAlive", "is-alive", "Whether is alive.", "0", True))
gec["simpleMembers"].append(Member("bool", "isWinner", "is-winner", "Whether is a winner.", "0", True))
gec["simpleMembers"].append(Member("QString", "takenCharacter", "taken-character", "Used for Vera Custer.", None, True))
gec["simpleMembers"].append(Member("qint8", "lifePoints", "life-points", "Player's life points.", "0", True))
gec["simpleMembers"].append(Member("PlayerRole", "role", "role", "Player's role (if is known)", "ROLE_INVALID", True))
GameEventCmds.append(gec)

gec = GameEventCmd("UpdateGameContext", "update-game-context")
gec["doxyString"] = (
                     "The GameContextCmdData struct describes a <i>game-context</i> command that "
                     "serves for updating the game context."
                    )
gec["complexMembers"].append(Member("GameContextData", "gameContext", "game-context", ""))
GameEventCmds.append(gec)

gec = GameEventCmd("SetPlayers", "set-players")
gec["doxyString"] = (
                     "The SetPlayersCmdData struct describes a <i>set-palyers</i> command that "
                     "is used to set all players."
                    )
gec["complexMembers"].append(Member("PlayerListData", "players", "players", ""))
GameEventCmds.append(gec)





